<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <my-header>
      <div slot="left">logo</div>
      <div>标题</div>
    </my-header>
    <my-header>
      <div slot="left">返回</div>
      <div>标题</div>
    </my-header>
  </div>
</body>
<template id="header">
  <header>
    <ul>
      <li><slot name="left"></slot></li>
      <li><slot></slot></li>
      <li>右</li>
    </ul>
  </header>
</template>
<script src="lib/vue.js"></script>
<script>
  const Header = {
    template: '#header'
  }
  new Vue({
    el: '#app',
    components: {
      MyHeader: Header
    }
  })
</script>
</html>